home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4911 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: news.ov.com!news
  2. From: glenn@ov.com (Fletcher.Glenn@ov.com)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Where Can I Find Standard C Library Sourc
  5. Date: 7 Feb 1996 22:22:07 GMT
  6. Organization: OpenVision
  7. Message-ID: <4fb8mf$ouo@spanky.pls.ov.com>
  8. References: <4f8915$jt@mother.usf.edu>
  9. Reply-To: glenn@ov.com
  10. NNTP-Posting-Host: foghorn.pls.ov.com
  11.  
  12. In article jt@mother.usf.edu, yatesc@csee.usf.edu (Randy Yates) writes:
  13. >I mean the source for functions like printf and strcpy.
  14. >
  15. >I've read the FAQ but didn't see anything about this.
  16. >-- 
  17. >% Randy Yates                  % "...the answer lies within your soul
  18. >% EE/Mathematics Student       %       'cause no one knows which side 
  19. >% University of South Florida  %                   the coin will fall."
  20. >% <yatesc@csee.usf.edu>        %  'Big Wheels', *Out of the Blue*, ELO   
  21. >
  22.  
  23. printf is usually very system specific once you get down to the level
  24. of actually outputting characters to a display device.  Therefore,
  25. you can only talk about source for a specific platform.
  26.  
  27. As for strcpy:
  28.  
  29. int strcpy(char *destination, char *source)
  30. {
  31.      while((*destination++ = *source++) != '\0');
  32. }
  33.  
  34. In general, it depends on the purpose of the function as to how
  35. platform independent the source is.  Usually anything that uses
  36. system hardware (I/O devices, Floating Point Units, etc) is
  37. system dependent, and just about everything else is not.
  38.  
  39.         Fletcher.Glenn@ov.com
  40.  
  41.  
  42.